﻿#include "BigEnemyBullet.h"
#include "Constants.h"

using namespace cocos2d;

bool BigEnemyBullet::init() {
	if (!Sprite::init()) {
		return false;
	}

	this->initBigEnemyBullet();
	this->initBody();

	return true;
}

void BigEnemyBullet::initBigEnemyBullet() {
	this->setTexture("Texture/EnemyBullet.png");
}

//BigEnemy Bullet
void BigEnemyBullet::initBody() {
	auto size = this->getContentSize();
	auto body = PhysicsBody::createBox(size);
	//ñʶ
	body->setTag(ContactTag::ENEMY_BULLET);
	//ײ
	body->setContactTestBitmask(0xFFFFFFFF);
	this->setPhysicsBody(body);
}